<template>
  <div class="store-box" v-if="isShowStore">
    <div class="box-header">
      <div class="box-title">商家共{{ mendianNumber }}家门店，看看那家离你最近</div>
      <div class="more-btn">查看全部<i class="el-icon-arrow-right"/></div>
    </div>
    <div class="store-content">
      <div class="store-item">
        <div class="store-cover">
          <img width="100%" height="100%" src="@/assets/images/activity/default_avator.png" alt="dark">
        </div>
        <div class="store-info">
          <div class="store-title">
            <span>{{ storeInfo.name }}</span>
          </div>
          <div class="store-address">{{ storeInfo.address }}</div>
        </div>
        <div class="store-right">
          <div class="headphone-icon"></div>
          <div class="store_right-text">联系Ta</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Store",
  props: {
    storeInfo: {
      type: Object,
      required: true
    },
    isShowStore: {
      type: Boolean,
      default: true
    },
    mendianNumber: {
      type: Number,
      default: 0
    }
  }
}
</script>

<style lang="scss" scoped>

.store-box {
  width: 345px;
  position: relative;
  background-color: var(--contact_bg, #fff);
  margin: 15px;
  padding: 0 15px;
  border-radius: 12px;
  .box-header {
    padding: 10px 0;
    border-bottom: 1px dashed var(--contact_color, #ff5400);
    color: var(--contact_color, #ff5400);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .box-title {
    font-size: 13px;
  }
  .more-btn {
    font-size: 13px;
    width: 75px;
    height: 24px;
    border: 1px solid var(--contact_color, #ff5400);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
  }
  .store-content {
    background-size: 100% 100%;
    position: relative;
  }
  .store-item {
    display: flex;
    height: 100%;
    padding: 15px 0;
    box-sizing: border-box;
  }
  .store-cover {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    overflow: hidden;
  }
  .store-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-left: 25px;
    box-sizing: border-box;
    height: 50px;
  }
  .store-right {
    text-align: center;
    font-size: 12px;
    color: #6a0900;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
  }
  .store-title {
    color: #333;
    font-size: 14px;
    font-weight: 700;
  }
  .store-address {
    font-size: 12px;
    position: relative;
    color: #666;
  }
  .headphone-icon {
    width: 21px;
    height: 21px;
    background: url("~@/assets/images/activity/headphone_icon.png") no-repeat;
    background-size: 100% 100%;
  }
}

</style>
